/* recent.c
 * Recent "preference" handling routines
 * Copyright 2004, Ulf Lamping <ulf.lamping@web.de>
 *
 * Wireshark - Network traffic analyzer
 * By Gerald Combs <gerald@wireshark.org>
 * Copyright 1998 Gerald Combs
 *
 * SPDX-License-Identifier: GPL-2.0-or-later
 */

#include <stdlib.h>
#include <unistd.h>
#include <errno.h>

#ifdef HAVE_PCAP_REMOTE
#include <capture_opts.h>
#endif

#include "recent.h"


#define RECENT_FILE_NAME "recent"
#define RECENT_COMMON_FILE_NAME "recent_common"

recent_settings_t recent;


/* opens the user's recent file and read the first part */
static void recent_read_static(void)
{
    /* set defaults */
//    recent.main_toolbar_show         = true;
//    recent.filter_toolbar_show       = true;
//    recent.wireless_toolbar_show     = false;
//    recent.packet_list_show          = true;
//    recent.tree_view_show            = true;
//    recent.byte_view_show            = true;
//    recent.packet_diagram_show       = true;
//    recent.statusbar_show            = true;
//    recent.packet_list_colorize      = true;
//    recent.capture_auto_scroll       = true;
//    recent.gui_time_format           = TS_RELATIVE;
//    recent.gui_time_precision        = TS_PREC_AUTO;
//    recent.gui_seconds_format        = TS_SECONDS_DEFAULT;
//    recent.gui_zoom_level            = 0;
    recent.gui_bytes_view            = BYTES_HEX;
    recent.gui_bytes_encoding        = BYTES_ENC_FROM_PACKET;
    recent.gui_allow_hover_selection = true;
    recent.gui_follow_show           = SHOW_ASCII;
//    recent.gui_follow_delta          = FOLLOW_DELTA_NONE;
//    recent.gui_show_bytes_decode     = DecodeAsNone;
    recent.gui_show_bytes_show       = SHOW_ASCII;
}

void recent_init(void)
{
    memset(&recent, 0, sizeof(recent_settings_t));
    recent_read_static();
}
